#ifndef __AES_HPP__
#define __AES_HPP__

#include "Algorithm.hpp"
#include "Block.hpp"
#include "AES_Algorithm.h"
#include "GenericException.hpp"

/**
 * implements AES symmetric cipher algorithm
 */
class AES : public Algorithm {

	private:
		AES_KEY encKey;
		AES_KEY decKey;

	public:
		AES() { }

		/**
		 * sets new key for encryption/decryption
		 * @param keyblock contains new key
		 */
		void setKey(const Block &keyblock);

		/**
		 * encrypts given block of plaintext
		 * @param plaintext
		 * @returns ciphertext
		 */
		Block encrypt(const Block &plaintext) const;

		/**
		 * decrypts given block of plaintext
		 * @param ciphertext
		 * @returns plaintext
		 */
		Block decrypt(const Block &ciphertext) const;

		/**
		 * @returns block size that is used by symmetric algorithm
		 */
		unsigned int getBlockSize() const;
};
#endif

